from django.db import models


# Create your models here.

class User(models.Model):
    username = models.CharField(max_length=20, unique=True, verbose_name="用户名")
    password = models.CharField(max_length=255, verbose_name="密码")
    age = models.IntegerField(verbose_name="年龄", null=True)
    email = models.EmailField(null=True)
    phone = models.CharField(max_length=11, null=True)
    create_time = models.DateTimeField(auto_now_add=True, verbose_name="注册时间")
    updated_time = models.DateTimeField(auto_now=True, verbose_name="更新时间")
    is_active = models.BooleanField(default=False, verbose_name="是否激活")

    class Meta:
        db_table = "user"
